This project demonstrates how to set up a simple animation. The source code for this demo was cleaned up a bit when SpriteWorld version 2.1 was released. It is now a much better model for your own programs. It now also creates a master Sprite, and adds only clones of this sprite to the animation; never the master Sprite itself. Although this is not necessary in such a simple project such as this, I thought it would be a good idea for the demo to do it anyway, since this technique is generally necessary in any real game, since you will need to be able to add and remove sprites on the fly without having to worry about accidentally removing and disposing the master sprite from which you make clones.
You can also try the following:
1) Set kInterlacedMode to true, and you will see what the animation looks like in interlaced (or "draw every-other-line") mode. It will also go a bit faster, which could be useful for those with slower computers. Using interlaced mode won't speed up non-scrolling animations such as the Simple demo as much as it will speed up scrolling animations, since in scrolling animations, the majority of the time is spent copying everything to the screen, which is why skipping every other line can make it go nearly twice as fast. However, interlacing may help even in non-scrolling animations if you need those extra fps on a slower computer.
2) Set kSyncToVBL to true to sync the animation to the monitor's refresh rate, making things look smoother. This may slow down the animation somewhat, since SpriteWorld has to wait for the VBL interrupt before drawing to the screen each frame. When syncing to the VBL, you should also set kMaxFPS to 0, or the animation may go even slower than normal, since it has to wait for both the VBL interrupt and the kMaxFPS delay. [Note: With 2.1, kSyncToVBL is set to true by default.]
3) Set kWorldRectInset to a non-zero value (such as 50) to see what it looks like when the SpriteWorld is smaller than its source window. This feature could be useful if you wanted a window that covers the screen on any size monitor, but you don't necessarily want the SpriteWorld to fill the entire window. Also, try doing a search for SWBounceSprite, to find the following two lines:
SWBounceSprite(ballSpriteP);
//SWWrapSprite(ballSpriteP);
Comment out the first line and uncomment the second line, and run the program. This will demonstrate how SpriteWorlds with custom world rects still have proper clipping of sprites.